package com.caiyouxi.app.model;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 我们接入的应用/游戏信息表
 */
public class AppInfoBean extends AppConfigBean implements Serializable {

    private Integer id;

    private String app_type; //应用类型：

    private Integer co_owner; //接入主体。是以我们哪个公司接入的。我们自己的公司在 partner：合作伙伴信息表 （类型包含OWNER的合作伙伴）中的编号。

    private String name; //引用名称

    private String subname; //子标题，一句话简介或卖点等

    private String alias; //引用别名。多个别人可以用英文逗号分割。

    private String paltform; //该应用的平台，只能有一个值：IOS、ANDROID、H5、PC。

    private Integer partner_id; //应用厂商在合作伙伴表中的编号。必须是合作伙伴表中，类型为 CP 的合作伙伴的编号。

    private String logo; //图标文件地址

    private String charging_mode; //付费类型.如果该字段为空白，则表示该应用免费下载使用。付费下载和应用内购买可同时存在，使用|分割；DOWNLOAD：付费下载;IN_APP：应用内购买

    private Integer category_id; //应用分类

    private String ad; //推广语，使用 markdown 语法，仅支持链接和加粗。

    private String detail; //应用介绍。支持完整的 markdown 格式

    private String screenshorts; //屏幕截图。

    private String status; // ON：上架 OFF：下架

    private String reg_number; //著作权登记号

    private Integer size; //package 大小，byte 单位。

    private Integer is_del; //	是否被删除。0-否；1：是

    private Date release_time; //发布日期。不包括时间

    private Integer downloads; //累计下载量。页面上显示的是 downloads+fake_downloads

    private Integer fake_downloads; //基准下载量。

    private Integer grade; //平均评分。10分制。真实数据。

    private Integer fake_grade; //基准评价。10分制。页面上线的是该字段值

    private Integer grade_count; //评分分数。即，多少人参与评分。真实数据。

    private Integer fake_grade_count; //基准分数。

    private String download_url; //下载地址/母包地址。这里通常放我们自己的官方渠道包下载地址。

    private String tags; //标签，每个标签不超过10个字符，最多可以添加5个标签；多个标签使用|分割

    private String version; //版本号。当前线上版本的版本号。

    private String release_type; //发布类型:RELEASE：正式版; OBT：公测; CBT：不删档内测; CBTD：删档内测

    private Date create_time; //创建时间

    private Date update_time; //最后更新时间

    private Integer create_by; //创建人

    private Integer update_by; //最后更新人


    @JsonIgnore
    private int total;
    @JsonIgnore
    private int page_size;//每页多少个
    @JsonIgnore
    private int page;//第几页
    @JsonIgnore
    private int start;

    @JsonIgnore
    private String orderBy;// 排序字段名
    @JsonIgnore
    private String order;// 按什么排序(asc,desc)

    private List list;



    public List getList() {
        return list;
    }

    public void setList(List list) {
        this.list = list;
    }

    public int getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public int getPage_size() {

        return page_size;
    }

    public void setPage_size(int page_size) {
        this.page_size = page_size;
    }

    public int getPage() {
        return page==0?1:page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public String getOrderBy() {
        return orderBy==null?"create_time desc":orderBy;
    }

    public void setOrderBy(String orderBy) {
        this.orderBy = orderBy;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }

    public int getStart()
    {
        return getPage()==1?0:(getPage()-1)*getPage_size();
    }

    public void setStart(Integer start)
    {
        this.start = start;
    }



    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getApp_type() {
        return app_type;
    }

    public void setApp_type(String app_type) {
        this.app_type = app_type;
    }

    public Integer getCo_owner() {
        return co_owner;
    }

    public void setCo_owner(Integer co_owner) {
        this.co_owner = co_owner;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSubname() {
        return subname;
    }

    public void setSubname(String subname) {
        this.subname = subname;
    }

    public String getAlias() {
        return alias;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public String getPaltform() {
        return paltform;
    }

    public void setPaltform(String paltform) {
        this.paltform = paltform;
    }

    public Integer getPartner_id() {
        return partner_id;
    }

    public void setPartner_id(Integer partner_id) {
        this.partner_id = partner_id;
    }

    public String getLogo() {
        return logo;
    }

    public void setLogo(String logo) {
        this.logo = logo;
    }

    public String getCharging_mode() {
        return charging_mode;
    }

    public void setCharging_mode(String charging_mode) {
        this.charging_mode = charging_mode;
    }

    public Integer getCategory_id() {
        return category_id;
    }

    public void setCategory_id(Integer category_id) {
        this.category_id = category_id;
    }

    public String getAd() {
        return ad;
    }

    public void setAd(String ad) {
        this.ad = ad;
    }

    public String getDetail() {
        return detail;
    }

    public void setDetail(String detail) {
        this.detail = detail;
    }

    public String getScreenshorts() {
        return screenshorts;
    }

    public void setScreenshorts(String screenshorts) {
        this.screenshorts = screenshorts;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getReg_number() {
        return reg_number;
    }

    public void setReg_number(String reg_number) {
        this.reg_number = reg_number;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public Integer getIs_del() {
        return is_del;
    }

    public void setIs_del(Integer is_del) {
        this.is_del = is_del;
    }

    public Date getRelease_time() {
        return release_time;
    }

    public void setRelease_time(Date release_time) {
        this.release_time = release_time;
    }

    public Integer getDownloads() {
        return downloads;
    }

    public void setDownloads(Integer downloads) {
        this.downloads = downloads;
    }

    public Integer getFake_downloads() {
        return fake_downloads;
    }

    public void setFake_downloads(Integer fake_downloads) {
        this.fake_downloads = fake_downloads;
    }

    public Integer getGrade() {
        return grade;
    }

    public void setGrade(Integer grade) {
        this.grade = grade;
    }

    public Integer getFake_grade() {
        return fake_grade;
    }

    public void setFake_grade(Integer fake_grade) {
        this.fake_grade = fake_grade;
    }

    public Integer getGrade_count() {
        return grade_count;
    }

    public void setGrade_count(Integer grade_count) {
        this.grade_count = grade_count;
    }

    public Integer getFake_grade_count() {
        return fake_grade_count;
    }

    public void setFake_grade_count(Integer fake_grade_count) {
        this.fake_grade_count = fake_grade_count;
    }

    public String getDownload_url() {
        return download_url;
    }

    public void setDownload_url(String download_url) {
        this.download_url = download_url;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getRelease_type() {
        return release_type;
    }

    public void setRelease_type(String release_type) {
        this.release_type = release_type;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(Date update_time) {
        this.update_time = update_time;
    }

    public Integer getCreate_by() {
        return create_by;
    }

    public void setCreate_by(Integer create_by) {
        this.create_by = create_by;
    }

    public Integer getUpdate_by() {
        return update_by;
    }

    public void setUpdate_by(Integer update_by) {
        this.update_by = update_by;
    }
}